jQuery(document).ready(function() {
	if(id==1){	
		$.supersized({
			slides  :  	[ {image : 'img/home-bg.jpg'} ]
		});
	};
	if(id==2){	
		$.supersized({
			slides  :  	[ {image : 'img/cafe-journal-bg.jpg'} ]
		});
	};
	if(id==3){	
		$.supersized({
			slides  :  	[ {image : 'img/adega-bg.jpg'} ]
		});
	};
	if(id==4){	
		$.supersized({
			slides  :  	[ {image : 'img/eventos-bg.jpg'} ]
		});
	};
	if(id==5){	
		$.supersized({
			slides  :  	[ {image : 'img/ambiente-bg.jpg'} ]
		});
	};
	if(id==6){	
		$.supersized({
			slides  :  	[ {image : 'img/chef-bg.jpg'} ]
		});
	};
	if(id==7){	
		$.supersized({
			slides  :  	[ {image : 'img/equipe-bg.jpg'} ]
		});
	};
	if(id==8){	
		$.supersized({
			slides  :  	[ {image : 'img/cardapio-bg.jpg'} ]
		});
	};
	if(id==9){	
		$.supersized({
			slides  :  	[ {image : 'img/cardapio-alacarte.jpg'} ]
		});
	};
	if(id==10){	
		$.supersized({
			slides  :  	[ {image : 'img/blog.jpg'} ]
		});
	};	
	
	jQuery('.nav-menu>li').hover(function(){jQuery(this).find('.sub-menu').show();}, function(){jQuery('.nav-menu>li>.sub-menu').hide();});
	
	try {$('#tab-container').easytabs();}catch(err){};
	
	try {
		jQuery('#mycarousel').jcarousel({
			scroll:1,
			auto:3
		});
	}catch(err){};
	try {
		jQuery('#mycarousel2').jcarousel({
			scroll:1,
			auto:3
		});
	}catch(err){};
	try {
		jQuery('#mycarousel3').jcarousel({
			scroll:1,
			auto:3
		});
	}catch(err){};
	
	//Galleriffic
	
		// Initially set opacity on thumbs and add
		// additional styling for hover effect on thumbs
		var onMouseOutOpacity = 0.3;
		$('#thumbs ul.thumbs li').opacityrollover({
			mouseOutOpacity:   onMouseOutOpacity,
			mouseOverOpacity:  1.0,
			fadeSpeed:         'fast',
			exemptionSelector: '.selected'
		});
		
		// Initialize Advanced Galleriffic Gallery
		try {
		var gallery = $('#thumbs').galleriffic({
			delay:                     500,
			numThumbs:                 4,
			preloadAhead:              8,
			enableTopPager:            true,
			enableBottomPager:         false,
			maxPagesToShow:            7,
			imageContainerSel:         '#slideshow',
			controlsContainerSel:      '#controls',
			captionContainerSel:       '#caption',
			loadingContainerSel:       '#loading',
			renderSSControls:          true,
			renderNavControls:         true,
			playLinkText:              'Play Slideshow',
			pauseLinkText:             'Pause Slideshow',
			prevLinkText:              '&lsaquo; Previous Photo',
			nextLinkText:              'Next Photo &rsaquo;',
			nextPageLinkText:          'Next &rsaquo;',
			prevPageLinkText:          '&lsaquo; Prev',
			enableHistory:             false,
			autoStart:                 false,
			syncTransitions:           true,
			defaultTransitionDuration: 500,
			onSlideChange:             function(prevIndex, nextIndex) {
				// 'this' refers to the gallery, which is an extension of $('#thumbs')
				this.find('ul.thumbs').children()
					.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
					.eq(nextIndex).fadeTo('fast', 1.0);
			},
			onPageTransitionOut:       function(callback) {
				this.fadeTo('fast', 0.0, callback);
			},
			onPageTransitionIn:        function() {
				this.fadeTo('fast', 1.0);
			}
		});
		}catch(err){};
	
	//Galleriffic
	
	
	try {
	$(".group1").colorbox({rel:'group1'});
	//jQuery('.group1').trigger('click');
	}catch(err){}
});